package org.smr.ministore.dao;


import org.apache.ibatis.annotations.Param;
import org.smr.ministore.entities.GoodsType;
import org.apache.ibatis.annotations.Mapper;
import org.blade.dao.base.BaseMapper;
import org.blade.dao.base.PageQueryMapper;

import java.util.List;


/**
*
**/
@Mapper
public interface GoodsTypeMapper extends BaseMapper<Long, GoodsType>,PageQueryMapper<Long,GoodsType> {

    /**
    * 逻辑删除
    * @param id
    *
    */
    int deleteByIdLogical(@Param("id")Long id);

    /**
     * 获取商品类形树
     * @param goodsType
     * @return
     */
    List<GoodsType> getGoodsTypeTree(@Param("entity") GoodsType goodsType);

    /**
     * 查询商品类型子类型数量
     *
     * @param goodsTypeId
     * @param organId
     * @return
     */
    int queryChildTypeCount(@Param("goodsTypeId")Long goodsTypeId, @Param("organId")Long organId);
}